-
Notifications
You must be signed in to change notification settings - Fork 30
Fix alias emitted in mapping #125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
I should have mentionned it. This is draft. As a proof of concept and for discussion purpose. |
851644f to
3d03825
Compare
3d03825 to
d98cd1a
Compare
|
I would prefer that we revert allowing |
d98cd1a to
7bb6299
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
ade13e8 to
8d9ab3d
Compare
|
Where are we at with this PR? @ccoVeille / @ingydotnet ? |
8d9ab3d to
ffe4314
Compare
|
@ingydotnet I rebased and fixed conflicts. |
ffe4314 to
edf4071
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it only after reading all discussions
The DeepEqual asserter was too simple to cover this.
This partially rolls back the changes made with 926dd0b The colon was allowed in the characters allowed for anchor and alias name. But it leads to ambiguity in the YAML structure.
The idea is to make sure that a YAML alias in a mapping is followed by a space before the : An issue appeared with the refactoring made recently that made sure to respect the YAML specification that allows having a `:` in an anchor and alias name.
edf4071 to
baafdbf
Compare
Yes, it's a fun and complicated issue for a niche 😅 |
This partially rolls back the changes made with 926dd0b with #47
The colon was allowed in the characters allowed for anchor and alias
name. But it leads to ambiguity in the YAML structure.
This PR also makes sure to emit a space when an alias is used in a key of a mapping node.
Related to:
The issue appeared with the refactoring made with #47 that made sure to respect the YAML specification that allows having a
:in an anchor and alias name.The issue was reported by @mikefarah when he tried to migrate on go.yaml.in/yaml/v4